<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/8/24
  Time: 22:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>新增售后</title>
    <link type="text/css" rel="stylesheet"
          href="${pageContext.request.contextPath}/admin/car/fontsawesome/css/font-awesome.css"/>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/admin/car/css/style.css"/>
</head>
<body>
<div class="main_box">
    <h2><span></span>新增售后</h2>
    <form action="${pageContext.request.contextPath}/shouhou/sousuo" method="post">
        <ul class="addpro_box clearfix" style="border-bottom:1px dashed #ddd;padding:0 20px;margin-bottom:10px;">
            <li>
                <label class="f_left">搜索会员：</label>
                <input type="text" placeholder="请输入姓名" name="nanec" value="${namec}"
                       class="f_left search_input"/>
                <input type="submit" value="搜索" class="btn blue_btn"/>
            </li>
        </ul>
    </form>


    <div class="cont_box" style="display:none;">
        <form action="${pageContext.request.contextPath}/shouhou/add" method="post" id="aftersales_form">
            <input type="hidden" name="nanes" value="${namec}">
            <ul class="addpro_box">
                <li>
                    <label>会员爱车：</label>
                    <div class="sales_radio f_left">
                        <c:forEach items="${listCar}" var="car">
                            <div class="car_list clearfix">
                                <span>${car.c_ipnumber}</span>
                                <span>行驶里程：<cite>${car.c_mileage}</cite></span>
                                <span>${car.c_iedate}</span>
                                <div class="radio_box">
                                    <i class="fa fa-circle-thin fa-1x"></i>
                                    <input type="radio" name="c_ipnumber" value="${car.c_ipnumber}" class="input_radio"
                                           required data-msg-required="请选择爱车"/>
                                    <span>选择</span>
                                    <input type="hidden" name="licheng" value="${car.c_mileage}">
                                </div>
                            </div>
                        </c:forEach>
                    </div>
                </li>
                <li>
                    <label>服务项目：</label>
                    <select name="service_id" required data-msg-required="服务项目不能为空">
                        <option value="">请选择服务项目</option>
                        <option value="保养">保养</option>
                        <option value="维修">维修</option>
                        <option value="清洁">清洁</option>
                    </select>
                </li>
                <li>
                    <label>价格：</label>
                    <input type="text" placeholder="请输入服务价格" name="pricein" required data-rule-pricein="true"
                           data-msg-required="服务价格不能为空"/>
                </li>
                <li>
                    <label>订单号：</label>
                    <select name="service_id" required data-msg-required="订单号不能为空">
                        <c:forEach items="${listName}" var="kk">
                            <option value="${kk}">${kk}</option>
                        </c:forEach>
                    </select>
                </li>
                <li>
                    <label>备注：</label>
                    <textarea rows="3" placeholder="请输入备注信息" name="remark"></textarea>
                </li>
            </ul>
            <div class="probtn_box clearfix">
                <input type="submit" value="新增售后" class="btn blue_btn submit"/>
            </div>
        </form>
    </div>
</div>
<!--javascript include-->
<script src="${pageContext.request.contextPath}/admin/car/js/jquery-2.2.1.min.js"></script>
<script src="${pageContext.request.contextPath}/admin/car/js/jquery.dataTables.min.js"></script>
<script src="${pageContext.request.contextPath}/admin/car/js/bootstrap-datepicker.js"></script>
<script src="${pageContext.request.contextPath}/admin/car/js/jquery.validate.min.js"></script>
<script src="${pageContext.request.contextPath}/admin/car/js/jquery.form.min.js"></script>
<script src="${pageContext.request.contextPath}/admin/car/js/other.js"></script>
<script>
			$(function(){
				$("body").other({formId:"#aftersales_form",formUrl:"${pageContext.request.contextPath}/shouhou/add"});//formUrl 表单请求地址
				var userInfo = $(".car_list").find("span").eq(0).text();
				if(userInfo!=""||userInfo!=""){
					$(".cont_box").show();
				}
			});

</script>
</body>
</html>
